home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00572_server communication scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  1.3 KB  |  49 lines

  1. on loadServerLists
  2.   global gSMSPath, gStuList, gSlash, gStuListPath
  3.   set gStuList to []
  4.   set gStuListPath to []
  5.   set tchDirList to getDirectory(gSMSPath)
  6.   repeat with i = 1 to count(tchDirList)
  7.     set teacher to getAt(tchDirList, i)
  8.     if tail(teacher, 3) = ".id" then
  9.       set clsDirList to getDirectory(gSMSPath & teacher)
  10.       repeat with j = 1 to count(clsDirList)
  11.         set CLASS to getAt(clsDirList, j)
  12.         if tail(CLASS, 3) = ".id" then
  13.           set stuDirList to getDirectory(gSMSPath & teacher & gSlash & CLASS)
  14.           repeat with k = 1 to count(stuDirList)
  15.             set student to getAt(stuDirList, k)
  16.             if tail(student, 3) = ".id" then
  17.               set s to head(student, -3)
  18.               add(gStuList, upperCase(s))
  19.               add(gStuListPath, gSMSPath & teacher & gSlash & CLASS & gSlash & student & gSlash)
  20.             end if
  21.           end repeat
  22.         end if
  23.       end repeat
  24.     end if
  25.   end repeat
  26.   if strList = [] then
  27.     return 0
  28.   else
  29.     return 1
  30.   end if
  31. end
  32.  
  33. on loadStuInfo thePath
  34.   global gStuInfo
  35.   set gStuInfo to [:]
  36.   set theFile to thePath & ".inf"
  37.   set strList to readPropTextFile(theFile)
  38.   if strList = EMPTY then
  39.     return 0
  40.   else
  41.     set gStuInfo to strList
  42.     return 1
  43.   end if
  44. end
  45.  
  46. on saveStudent
  47.   saveMethod()
  48. end
  49.